﻿using Application_Core.Dispatcher_Component.Access_Layer;
using Application_Core.Dispatcher_Component.Access_Layer.Implementations;
using Application_Core.Monitor_Component.Business_Logic_Layer;
using RabbitMQ_Service.MessageTypes;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.Common;
using Utility.Global.DataTypes;
using Utility.RabbitMQ_Service;

namespace Application_Core.Monitor_Component.Access_Layer.Implementations
{
    public class MonitorComponentFacade : MonitorService
    {
        private readonly DispatcherForMonitorService dispatcherForMonitorService;
        private readonly MonitorComponentBusinessLogic monitorLogic;

        public MonitorComponentFacade()
        {
            this.dispatcherForMonitorService = new DispatcherComponentFacade();
            this.monitorLogic = new MonitorComponentBusinessLogicImpl(this.dispatcherForMonitorService);
        }

        public void StartIAmAliveHandler()
        {
            this.monitorLogic.StartIAmAliveHandler();
        }


        List<SystemTyp> MonitorService.FindSystemStatus()
        {
            return this.monitorLogic.FindSystemStatus();
        }

        public bool StartSystem(string systemName)
        {
            return this.monitorLogic.StartSystem(systemName);
        }

        public bool StopSystem(string systemName)
        {
            return this.monitorLogic.StopSystem(systemName);
        }
    }
}
